<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
    <title><?php echo C_TITLE ?></title>
    <base href="<?=base_url()?>" />
    <meta name="description"  content="<?php echo C_META_DESCRIPTION    ?>">
    <meta name="keywords"     content="<?php echo C_META_KEYWORDS       ?>">
    <meta name="author"       content="<?php echo C_META_AUTHOR         ?>">
    <meta name="generator"    content="Emacs http://www.gnu.org/software/emacs/">
    <link rel="stylesheet" href="application/views/scripts/css/exportarxml.css" type="text/css" media="screen" />
    <script type='text/javascript'><?php include('scripts/js/exportarxml.js') ?></script>
<?php
ob_start('comprimir_pagina');
session_start();
?>
  </head>
  <body >
    
    <!-- Título -->
    <center>
      <h4 class='ui-state-highlight ui-corner-all forh4'><?php echo $this->lang->line("TITLE")?></h4>
    </center>    

      <!-- Accordion -->
      <div id="container-exportarxml" style="width:965px;" >
        
        <!-- Sección de gestión de colocación de personas -->
        <h3><a href="#"><?php echo $this->lang->line("G_CAPTION") ?></a></h3>
        <div id="colocacion" class="">
          <div id="toolbar" class="ui-widget-header ui-corner-all mini-toolbar">
            <button id='borrar'     name='borrar'     type='button' ><?php echo $this->lang->line("B_BORRAR")     ?></button>
	    <button id='importar'   name='importar'   type='button' ><?php echo $this->lang->line("B_IMPORTAR")   ?></button>
	    <button id='generarxml' name='generarxml' type='button' ><?php echo $this->lang->line("B_GENERARXML") ?></button>
          </div>
          <center>
	    <table id="barra-<?php echo $this->pre ?>"  ></table>
            <table id="filtro-<?php echo $this->pre ?>" oncontextmenu="return false"></table>
          </center>
        </div>
        
        <!-- Sección de Totales -->
        <h3><a href="#"><?php echo $this->lang->line("GT_CAPTION") ?></a></h3>
        <div id="totales" class="ui-corner-all" >
          <center>
            <table id="barra-<?php echo $this->pret ?>"></table>
            <table id="filtro-<?php echo $this->pret ?>" oncontextmenu="return false"></table>
          </center>
        </div>
        
      </div>

    <div id="dialog-form-add" style="display:none;">
      <form method="" id="" action="" >
	<p id='comment' class='validateTips ui-corner-all'></p>
	<input type="hidden" name="id" id="id" value="" />
	<div id="tabs-<?php echo $this->pre ?>" >
	  <ul>
	    <li><a href="#div-<?php echo $this->pre ?>-1">General</a></li>
	    <li><a href="#div-<?php echo $this->pre ?>-2">Datos Agregados</a></li>
	  </ul>
	  <div id="div-<?php echo $this->pre ?>-1" style='height:300px; margin-bottom:30px;'>
	    <table id="table-<?php echo $this->pre ?>-1" align='center'>
              <tr>
                <td colspan=2 class="form-etiqueta" align="right" style="padding-right:10px;">
                  <?php echo $this->lang->line("F_ANO_MES_ENVIO") ?>
                </td>
                <td colspan=2 class="form-campo">
                  <select id='mes-envio' name='mes-envio' class='selectoption ui-widget-content ui-corner-all' style="width:40%;">
                    <option value=01  >Enero        </option>
                    <option value=02  >Febrero      </option>
                    <option value=03  >Marzo        </option>
                    <option value=04  >Abril        </option>
                    <option value=05  >Mayo         </option>
                    <option value=06  >Junio        </option>
                    <option value=07  >Julio        </option>
                    <option value=08  >Agosto       </option>
                    <option value=09  >Septiembre   </option>
                    <option value=10 >Octubre      </option>
                    <option value=11 >Noviembre    </option>
                    <option value=12 >Diciembre    </option>
                  </select>
                  <select id='ano-envio' name='ano-envio' class='selectoption ui-widget-content ui-corner-all' style="width:40%;">
                    <option value=2000  >2000     </option>
                    <option value=2001  >2001     </option>
                    <option value=2002  >2002     </option>
                    <option value=2003  >2003     </option>
                    <option value=2004  >2004     </option>
                    <option value=2005  >2005     </option>
                    <option value=2006  >2006     </option>
                    <option value=2007  >2007     </option>
                    <option value=2008  >2008     </option>
                    <option value=2009  >2009     </option>
                    <option value=2010  >2010     </option>
                    <option value=2011  >2011     </option>
                    <option value=2012 selected >2012     </option>
                    <option value=2013  >2013     </option>
                    <option value=2014  >2014     </option>
                    <option value=2015  >2015     </option>
                    <option value=2016  >2016     </option>
                    <option value=2017  >2017     </option>
                    <option value=2018  >2018     </option>
                    <option value=2019  >2019     </option>
                    <option value=2020  >2020     </option>
                  </select>
                  
                  <!-- <input type='text' name='ano_mes_envio' size='10' maxlength='10' class='inputtext ui-widget-content ui-corner-all'> -->
                  <span title="<?php echo $this->lang->line('ATL_INFOREQUERIDO') ?>" class='inforequerido'>*</span>
                </td>
              </tr>
	      <tr>
	        <td colspan=4 class='ui-state-highlight '></td>
	      </tr>
	      <tr>
	        <td class='form-etiqueta'>
	          <?php echo $this->lang->line("F_DNI") ?>
	        </td>
	        <td class='form-campo'>
	          <input type='text' id='dni' name='dni'  size='10' maxlength='9' class='inputtext ui-widget-content ui-corner-all' title='<?php echo $this->lang->line("ATL_HELP_DNI") ?>' >
	          <span title="<?php echo $this->lang->line('ATL_INFOREQUERIDO') ?>" class='inforequerido'>*</span>
                </td>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_NOMBRE") ?>
                </td>
                <td class='form-campo'>
                  <input type='text' id='nombre' name='nombre' size='20' maxlength='15' class='inputtext ui-widget-content ui-corner-all'>
                  <span title="<?php echo $this->lang->line('ATL_INFOREQUERIDO') ?>" class='inforequerido'>*</span>
                </td>
              </tr>
              <tr>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_APELLIDO1") ?>
                </td>
                <td class='form-campo'>
                  <input type='text' id='apellido1' name='apellido1' size='20' maxlength='20' class='inputtext ui-widget-content ui-corner-all'>
                  <span title="<?php echo $this->lang->line('ATL_INFOREQUERIDO') ?>" class='inforequerido'>*</span>
                </td>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_APELLIDO2") ?>
                </td>
                <td class='form-campo'>
                  <input type='text' id='apellido2' name='apellido2' size='20' maxlength='20' class='inputtext ui-widget-content ui-corner-all'>
                </td>
              </tr>
              <tr>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_NACIMIENTO") ?>
                </td>
                <td class='form-campo'>
                  <input type='text' name='nacimiento' size='10' maxlength='10' class='inputtext ui-widget-content ui-corner-all date'>
                  <span title="<?php echo $this->lang->line('ATL_INFOREQUERIDO') ?>" class='inforequerido'>*</span>
                </td>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_SEXO") ?>
                </td>
                <td class='form-campo'>
                  <select id='sexo' name='sexo' class='selectoption ui-widget-content ui-corner-all' style='width:100px;'>
                    <option value='1'>Varon</option>
                    <option value='2'>Mujer</option>
                  </select>
                  <span title="<?php echo $this->lang->line('ATL_INFOREQUERIDO') ?>" class='inforequerido'>*</span>
                </td>
              </tr>
              <tr>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_DISCAPACIDAD") ?>
                </td>
                <td class='form-campo'>
                  <select id='discapacidad' name='discapacidad'  class='selectoption ui-widget-content ui-corner-all' style='width:100px;'>
                    <option value='0'>No</option>
                    <option value='1'>Si</option>
                  </select>
                  <span title="<?php echo $this->lang->line('ATL_INFOREQUERIDO') ?>" class='inforequerido'>*</span>
                </td>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_INMIGRANTE") ?>
                </td>
                <td class='form-campo'>
                  <select id='inmigrante' name='inmigrante'   class='selectoption ui-widget-content ui-corner-all' style='width:100px;'>
                    <option value='0'>No</option>
                    <option value='1'>Si</option>
                  </select>
                  <span title="<?php echo $this->lang->line('ATL_INFOREQUERIDO') ?>" class='inforequerido'>*</span>
                </td>
              </tr>
              <tr>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_COLOCADO") ?>
                </td>
                <td class='form-campo'>
                  <select id='colocado'     name='colocado' class='selectoption ui-widget-content ui-corner-all' style='width:100px;'>
                    <option value='0'>No</option>
                    <option value='1'>Si</option>
                  </select>
                  <span title="<?php echo $this->lang->line('ATL_INFOREQUERIDO') ?>" class='inforequerido'>*</span>
                </td>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_FCOLOCADO") ?>
                </td>
                <td class='form-campo'>
                  <input type='text' name='fcolocado' size='10' maxlength='10' class='inputtext ui-widget-content ui-corner-all date'>
                </td>
              </tr>
              <tr>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_NIVELFORMATIVO") ?>
                </td>
                <td class='form-campo'>
                  <select id='nivelformativo' name='nivelformativo' class='selectoption ui-widget-content ui-corner-all' style='width:150px;'>
                    <option value='00'>Sin estudios          </option>
                    <option value='10'>Nivel básico          </option>
                    <option value='20'>Formación profesional </option>
                    <option value='30'>Bachiller             </option>
                    <option value='40'>Estudios superiores   </option>
                  </select>
                </td>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_TCONTRATO") ?>
                </td>
                <td class='form-campo'>
                  <select id='tcontrato' name='tcontrato' class='selectoption ui-widget-content ui-corner-all' style='width:250px;'>
                    <option value='001'>Indefinido tiempo completo              </option>
                    <option value='003'>Indefinido tiempo parcial               </option>
                    <option value='401'>Duración determinada tiempo completo    </option>
                    <option value='501'>Duración determinada tiempo parcial     </option>
                  </select>
                </td>
              </tr>
              <tr>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_CIFNIF") ?>
                </td>
                <td class='form-campo'>
                  <input type='text' id='cifnif' name='cifnif' size='10' maxlength='9' class='inputtext ui-widget-content ui-corner-all'>
                </td>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_EMPRESA") ?>
                </td>
                <td class='form-campo'>
                  <textarea id='empresa' name='empresa' maxlength='55' class='textarea ui-widget-content ui-corner-all' rows=2 cols=20></textarea>
                </td>
              </tr>
            </table>
          </div>
          <div id="div-<?php echo $this->pre ?>-2" style='height:300px;'>
            <table id="table-<?php echo $this->pre ?>-2" align='center' width='100%'>
              <tr>
                <td colspan=4 class='ui-state-default '></td>
              </tr>
              <tr>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_NUEVA") ?>
                </td>
                <td class='form-campo'>
                  <input type='checkbox' id='nueva' name='nueva' class='inputcheckbox ui-widget-content ui-corner-all' value='N' >
                </td>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_FREGISTRO") ?>
                </td>
                <td class='form-campo'>
                  <input type='text' name='fregistro' size='10' maxlength='10' class='inputtext ui-widget-content ui-corner-all date'>
                </td>
              </tr>
              <tr>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_INSERCION") ?>
                </td>
                <td class='form-campo'>
                  <input type='checkbox' id='insersion' name='insercion'  class='inputcheckbox ui-widget-content ui-corner-all' value='N' >
                </td>
                <td class='form-etiqueta'>
                  &nbsp;
                </td>
                <td class='form-campo'>
                  &nbsp;
                </td>
              </tr>
              <tr>
                <td class='form-etiqueta'>
                  <?php echo $this->lang->line("F_PERCEPTORA") ?>
                </td>
                <td class='form-campo'>
                  <input type='checkbox' id='perceptora' name='perceptora' class='inputcheckbox ui-widget-content ui-corner-all' value='N' >
                </td>
                <td class='form-etiqueta'>
                  &nbsp;
                </td>
                <td class='form-campo'>
                  &nbsp;
                </td>
              </tr>
            </table>
          </div>
        </div>
        <table id='table-<?php echo $this->pre ?>-3' align='right'>
        <tr>
          <td>
            <button id="reset"  type="reset"  name="reset"  ><?php echo $this->lang->line("FORM_BUTTON_RESET") ?></button>
            <button id="enviar" type="button" name="enviar" ><?php echo $this->lang->line("FORM_BUTTON_SAVE")  ?></button>
          </td>
        </tr>
</table>
</form>
</div>


<div id="div-<?php echo $this->pre ?>-4" >
  <table id="table-<?php echo $this->pre ?>-4" align='left'>
    <tr>
      <td class='form-etiqueta'>
        <?php echo $this->lang->line("FI_MES") ?>
      </td>
      <td class='form-campo' style='width:300px'>
        <select id='mes' name='mes' class='selectoption'>
          <option value=1  >Enero        </option>
          <option value=2  >Febrero      </option>
          <option value=3  >Marzo        </option>
          <option value=4  >Abril        </option>
          <option value=5  >Mayo         </option>
          <option value=6  >Junio        </option>
          <option value=7  >Julio        </option>
          <option value=8  >Agosto       </option>
          <option value=9  >Septiembre   </option>
          <option value=10 >Octubre      </option>
          <option value=11 >Noviembre    </option>
          <option value=12 >Diciembre    </option>
        </select>
      </td>
    </tr>
  </table>
</div>

<!-- Div utilizada para el dialog donde aparece el form para generar el XML -->
<div id="dialog-form-genxml" title="Generar Archivo XML" style="display:none; font-size:12px;">
  <p class="validateTips ui-corner-all" style="padding:4px;"></p>
  <form>
    <select name="anomesenvio" id="anomesenvio" class="ui-widget-content ui-corner-all" style="margin-bottom:2px; width:50%; padding: .4em;">
      <?php echo $options?>
    </select>  
  </form>
</div>
<!-- **************************************** -->
</body>
</html>
<?php
ob_end_flush();
// Función para eliminar todos los espacios en blanco
function comprimir_pagina($buffer) {
    $busca = array('/\>[^\S ]+/s','/[^\S ]+\</s','/(\s)+/s');
    $reemplaza = array('>','<','\\1');
    return preg_replace($busca, $reemplaza, $buffer);
}
?>
